package org.nanhill.osgi.example.biz.impl;

import org.nanhill.osgi.example.biz.LoginValidator;
import org.nanhill.osgi.example.manager.AccountNotExist;

public class ValidatorDefault implements LoginValidator {

	public void valide(String username, String pass) throws AccountNotExist {
		if ("root".equals(username) && "root".equals(pass)) {
			return;
		} else {
			throw new AccountNotExist();
		}

	}

	@Override
	public String toString() {
		return "Validator Default:" + hashCode();
	}

}
